<?php

/**
 * 首页
 */
class IndexAction extends HomeBaseAction {
	
    //首页
	public function index() {
        C('OUTPUT_ENCODE',false);
        $this->location = 'home';

        $this->display(':index');

    }   


    /**
     * 清楚缓存
     * @return [type] [description]
     */
    public function clear(){

        $runtime_path = rtrim( ltrim( RUNTIME_PATH , '.') , '/');
        // echo $runtime_path;exit;
        if(!is_dir($runtime_path)) $this->error('错误');
        deldir($runtime_path);

        // session('reload',null);

        $this->success('清除缓存成功','',1);
        // echo "<h1>清除缓存成功</h1>";
        // $this->ajaxReturn('0');
    }
}

